package cn.zebra.dev.other.module.shopAddress.service.impl;

import cn.zebra.dev.ibatis.plus.service.impl.ServiceImpl;
import cn.zebra.dev.ibatis.plus.utils.PageUtils;
import cn.zebra.dev.ibatis.plus.utils.Query;
import cn.zebra.dev.other.module.shopAddress.dao.ShopAddressDao;
import cn.zebra.dev.other.module.shopAddress.entity.ShopAddressEntity;
import cn.zebra.dev.other.module.shopAddress.service.ShopAddressService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 
 *
 * @author runnable
 */
@Service
public class ShopAddressServiceImpl extends ServiceImpl<ShopAddressDao, ShopAddressEntity> implements ShopAddressService {

    @Override
    public PageUtils<ShopAddressEntity> findPage(Map<String, Object> params) {
        QueryWrapper<ShopAddressEntity> wrapper = new QueryWrapper<>();
        wrapper.apply("delete_falg = FALSE");
        IPage<ShopAddressEntity> page = this.page(
                new Query<ShopAddressEntity>(params).getPage(),
                wrapper
        );
        return new PageUtils<>(page);
    }

}
